package com.haiyangwang1.lesson5;

public class AbstractDemo{
    public static void main(String[] args) {
        Animal cat=new Cat("鱼","喵喵喵");
        Animal dog=new Dog("骨头","汪汪汪");
        Animal bird=new Bird("虫子","叽叽喳喳");
        Animal whale=new Whale("鱼","嘤嘤嘤");
        Feeder feeder=new Feeder();
        feeder.feedAnimal(cat);
        feeder.feedAnimal(dog);
        feeder.feedAnimal(bird);
        feeder.feedAnimal(whale);
    }
}
